import { createRouter, createWebHistory } from 'vue-router'
import Login from '../views/Login.vue'
import Dashboard from '../views/Dashboard.vue'
import NewCase from '../views/NewCase.vue'
import Cases from '../views/Cases.vue'
import Reports from '../views/Reports.vue'
import Appointments from '../views/Appointments.vue'
import ProductSelection from '../views/ProductSelection.vue'
import MainLayout from '../components/MainLayout.vue'
import TestPage from '../views/TestPage.vue'
import SuperiorLogin from '../views/SuperiorLogin.vue'
import DocumentReview from '../views/DocumentReview.vue'

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/superior-login',
    name: 'SuperiorLogin',
    component: SuperiorLogin
  },
  {
    path: '/',
    component: MainLayout,
    children: [
      {
        path: 'dashboard',
        name: 'Dashboard',
        component: Dashboard
      },
      {
        path: 'new-case',
        name: 'NewCase',
        component: NewCase
      },
      {
        path: 'cases',
        name: 'Cases',
        component: Cases
      },
      {
        path: 'reports',
        name: 'Reports',
        component: Reports
      },
      {
        path: 'appointments',
        name: 'Appointments',
        component: Appointments
      },
      {
        path: 'product-selection',
        name: 'ProductSelection',
        component: ProductSelection
      },
      {
        path: 'test',
        name: 'TestPage',
        component: TestPage
      },
      {
        path: 'document-review',
        name: 'DocumentReview',
        component: DocumentReview
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
